<!--
  ~ Copyright 2019 ABSA Group Limited
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<div class="row align-items-center text-center">
  <div class="col-sm-1"></div>
  <div class="col-sm-2">
    <time-picker [model]="model[0].time" (modelChange)="onTimeFromChange($event)">
    </time-picker>
  </div>
  <div class="col-sm-2">
    <label>From date:</label>
    <date-picker [model]="model[0].date" (modelChange)="onSelectedDatesChange([$event, model[1].date])"
      [minDate]="(modelBoundaries || [])[0]?.date" [maxDate]="(modelBoundaries || [])[1]?.date">
    </date-picker>
    <label>&nbsp;</label>
  </div>
  <div class="col-sm-2">
    <date-range-picker [minDate]="(modelBoundaries || [])[0]?.date" [maxDate]="(modelBoundaries || [])[1]?.date"
      [model]="[model[0].date, model[1].date]" (modelChange)="onSelectedDatesChange($event)">
    </date-range-picker>
  </div>
  <div class="col-sm-2">
    <label>To date:</label>
    <date-picker [model]="model[1].date" (modelChange)="onSelectedDatesChange([model[0].date, $event])"
      [minDate]="(modelBoundaries || [])[0]?.date" [maxDate]="(modelBoundaries || [])[1]?.date">
    </date-picker>
    <label>&nbsp;</label>
  </div>
  <div class="col-sm-2">
    <time-picker [model]="model[1].time" (modelChange)="onTimeTillChange($event)">
    </time-picker>
  </div>
</div>